This section covers the basic/simple operations that an application would need to be performed on an RFID Reader which includes Inventory and single tag access operations.
A simple continuous inventory operation would read all tags in the field of view of all antennas of the connected RFID Reader. It will use NO filters (pre-filters or post-filters) and the start and stop trigger for the inventory would be default, i.e. start immediately when rfid3.Actions.Inventory.Perform is called, and stop immediately when rfid3.Actions.Inventory.Stop is called.
// perform simple inventory
rfid3.Actions.Inventory.Perform();
// Keep getting tags in the ReadNotify event if registered
// stop the inventory
rfid3.Actions.Inventory.Stop();
Tag Access operations can be performed on a specific tag or can be applied on tags that match a specific Access-Filter. If no Access-filter is specified the Access Operation will be performed on all Tags in the field of view of chosen Antennas.
This section covers simple tag access operation on a specific tag which could be in the field of view of any of the antenna of the connected RFID Reader.
The application can call method rfid3.Actions.TagAccess.ReadWait to read data from a specific memory bank.
// Read user memory bank for the given tag ID
string tagId = "1234ABCD00000000000025B1";
TagAccess.ReadAccessParams readParams = new TagAccess.ReadAccessParams();
TagData readAccessTag;
readParams.AccessPassword = 0;
readParams.ByteCount = 8;
readParams.MemoryBank = MEMORY_BANK.MEMORY_BANK_USER;
readParams.ByteOffset = 0;
readAccessTag = rfid3.Actions.TagAccess.ReadWait(tagId, readParams, null);
Console.WriteLine(readAccessTag.MemoryBank.ToString() + " : " + readAccessTag.MemoryBankData);
The application can call method rfid3.Actions.TagAccess.WriteWait or rfid3.Actions.TagAccess.BlockWriteWait to write data to a specific memory bank.
// Write user memory bank data
string tagId = "1234ABCD00000000000025B1";
TagAccess.WriteAccessParams writeParams = new TagAccess.WriteAccessParams();
byte[] writeData = new byte[4] {0x11, 0x22, 0x33, 0x44};
writeParams.AccessPassword = 0;
writeParams.WriteDataLength = writeData.Length;
writeParams.MemoryBank = MEMORY_BANK.MEMORY_BANK_USER;
writeParams.ByteOffset = 0;
writeParams.WriteData = writeData;
// antenna Info is null performs on all antenna
rfid3.Actions.TagAccess.WriteWait(tagId, writeAccessParams, null);
The application can call method rfid3.Actions.TagAccess.LockWait to perform lock operation on one or more memory banks with specific privileges.
// Lock the tag
string tagId = "1234ABCD00000000000025B1";
TagAccess.LockAccessParams lockAccessParams = new TagAccess.LockAccessParams();
/* lock now */
lockAccessParams.LockPrivilege[lockAccessParams.UserMemory] = LOCK_PRIVILEGE.LOCK_PRIVILEGE_READ_WRITE;
lockAccessParams.AccessPassword = 0;
rfid3.Actions.TagAccess.LockWait(tagId, lockAccessParams, null);
The application can call method rfid3.Actions.TagAccess.KillWait to kill a tag.
// Kill the tag
string tagId = "1234ABCD00000000000025B1";
TagAccess.KillAccessParams killAccessParams = new TagAccess.KillAccessParams();
killAccessParams.KillPassword = 0;
rfid3.Actions.TagAccess.KillWait(tagId, killAccessParams, null);
The application can call RFID_BlockErase to erase the contents of a tag.
// Block Erase
string tagId = "1234ABCD00000000000025B1";
TagAccess.BlockEraseAccessParams blockEraseAccessParams = new TagAccess.BlockEraseAccessParams();
blockEraseAccessParams.AccessPassword = 0;
blockEraseAccessParams.MemoryBank = MEMORY_BANK.MEMORY_BANK_USER; // user memory bank
blockEraseAccessParams.ByteOffset = 0; // start erasing from offset 0
blockEraseAccessParams.ByteCount = 16; // number of bytes to erase
rfid3.Actions.TagAccess.BlockEraseWait(tagId, blockEraseAccessParams, null);
The application can call method rfid3.Actions.TagAccess.BlockPermalockWait to block permalock a tag. Tags reported as part of Block-Permalock access operation will have TagData.OpCode as ACCESS_OPERATION_BLOCK_PERMALOCK, and TagData.OpStatus indicating the result of the operation; if TagData.OpStatus is ACCESS_SUCCESS, TagData.MemoryBankData will contain the Block-Permalock Mask Data.
// Kill the tag
string tagId = "1234ABCD00000000000025B1";
TagAccess.BlockPermalockAccessParams blockPermalockAccessParams = new TagAccess. BlockPermalockAccessParams ();
byte[] permalockMask = new byte[4] {0xF0, 0x00, 0x00, 0x00};
blockPermalockAccessParams.ReadLock = true;
blockPermalockAccessParams.MemoryBank = MEMORY_BANK_USER;
blockPermalockAccessParams.ByteOffset = 0;
blockPermalockAccessParams.ByteCount = 0;
blockPermalockAccessParams.Mask = permalockMask;
blockPermalockAccessParams.MaskLength= 4;
rfid3.Actions.TagAccess.BlockPermalockWait(tagId, blockPermalockAccessParams, null);
The application can call method rfid3.Actions.TagAccess.RecommissionWait to enable a tag, containing information, to be reused.
// Kill the tag
string tagId = "1234ABCD00000000000025B1";
TagAccess.RecommissionAccessParams recommissionAccessParams = new TagAccess.RecommissionAccessParams();
recommissionAccessParams.KillPassword = 0xAAAAAAAA;
recommissionAccessParams.opCode = RECOMMISSION_OPERATION_CODE .RECOMMISSION_DISABLE_PERMALOCK;
rfid3.Actions.TagAccess.RecommissionWait(tagId, recommissionAccessParams, null);